/**
 * product grid
 */
Ext.define('Product.view.ProductGrid',{
	extend : 'Ext.grid.Panel',
	alias:'widget.productgrid',
	store : Ext.create('Product.store.ProductEntities'),
	columns:[
		{header:'产品ID',dataIndex:'proId'},
		{header:'产品名称',dataIndex:'proName',field:'textfield'},
		{ header: '生产厂家', dataIndex: 'factory'},
        { header: '产品描述', dataIndex: 'proDesc',flex:1,field:{xtype:'textfield',allowBlank:false}}
	],
	tbar:['->',
		{text:'添加',id:'add',iconCls:'Add'},'-',
		{text:'删除',id:'delete',iconCls:'Delete'},'-',
		{text:'保存',id:'save',iconCls:'Tablesave'},'-',
		{text:'编辑',id:'edit',iconCls:'Tableedit'}
	],
	dockedItems:[{
		xtype:'pagingtoolbar',
		store:Ext.create('Product.store.ProductEntities'),
		displayInfo:true,
		dock:'bottom'
	}],
	plugins: [
        Ext.create('Ext.grid.plugin.CellEditing', {
            clicksToEdit: 2
        })
    ],
    selType:'cellmodel',
    initComponent:function(){
		this.callParent(arguments);
	}
    
});